package com.jiazhong.basic.shuxin.thread;

import java.util.concurrent.Callable;

// 3️⃣线程的实现方式
public class DemoC implements Callable<String> {
    @Override
    public String call() throws Exception {
        String currentThreadName = Thread.currentThread().getName();
        for (int i = 0; i < 10; i++) {
            System.out.println(currentThreadName + "输出了：" + i);
        }
        return currentThreadName + "总共输出了10次";
    }
}
